home *** CD-ROM | disk | FTP | other *** search
- Article 11090 (2 more) in comp.sys.atari.st:
-
- Subject: Strange '-s' flag behavior in the GNU linker ?
-
-
- From: VBRANDT%DBNUAMA1.BITNET@CUNYVM.CUNY.EDU
-
- I have found what is not quite a bug, but a somewhat annoying feature in
- the GNU C linker. It seems that the '-s' flag does exactly the opposite
- of what I think it should do. If you don't specify '-s',the linker appends
- a symbol table to the executable, if you do specify it, no symbol table is
- produced.
-
- Well, I admit it's somewhat counter-intuitive, but the semantics of -s
- is unchanged from what it was in the unhacked LD.C. i.e., the default
- behaviour really is supposed to be to produce a symbol table. After
- thinking about it, though, it seems reasonable to change it in the ST
- version, as the ST format symbol tables are never useful.
-
- This means that to make executables without symbol tables, one
- cannot use GCC, but has to invoke everything manually.
-
- That's not true. GCC passes the -s flag along if it's specified. (At
- least it's supposed to; did I introduce a bug at the last minute?)
-
- Also, all the executables from the GNU package themselves have quite
- big symbol tables. Removing them would save several KB, which might
- help people suffering from storage/memory shortages.
-
- Indeed. I'm pretty sure I built all the executables with -s (to GCC),
- so if they've really got symbol tables, perhaps I did leave a bug in
- there. I'll investigate tonight and post the results.
-
- Anyway, thanks to John for his impressive work !
-
- You're very welcome.
- End of article 11090 (of 11092)
- --what next? [npq]
-
- Article 11091 (1 more) in comp.sys.atari.st:
-
- Subject: Re: gcc problems
-
-
- Date: 9 Sep 88 03:34:23 GMT
- From: mcvax!cernvax!ethz!forty2!poole@uunet.uu.net (Simon Poole)
-
- In article <JEFF.88Sep2035059@stormy.atmos.washington.edu>
- jeff@stormy.atmos.washington.edu (Jeff Bowden) writes:
- >I grabbed the gcc executables a few days ago. I found that I had
- >insufficient resources to run it (sob :-( ).
-
- Gcc can be run on a 1 MB machine! You will not be able to compile any
- larger files from GULAM, but you can revert to compiling from the Desk-
- top if memory is a problem.
-
- To bootstrap you NEED:
- a copy of gulam
- a diskeditor
-
- 1) patch the executable of gcc-cc1.ttp so that only 300 kB of stack in-
- stead of 500 kB are allocated (you can search for the value 500000,
- it only occurs once, somewhere around 364kB).
-
- Yah, that's described in the blurb. In fact, 300000 is still far more
- than you need; in my experience, 128K is plenty for most things. The
- thing that really eats stack is compiling large hairy functions is -O;
- the 500000 value is for compiling the instruction-cracking routing in
- GAS. If you can live without -O, 64K or maybe even 32K will be enough.
-
- [That you have to do this is really
- a bug, there is NO need for a GEMDOS only program, that doesn't exec
- another program to give memory back to GEMDOS, I'm changing my crt0
- so that it will take -1L in _stksize to mean: "Don't do a Mshrink"]
-
- Careful; memory that is malloc'ed comes from ABOVE the stack, not below
- it, so you really do want to keep the stack at the smallest value that
- works for you.
-
- 2) Now throw all resident stuff out (accessories etc. just keep GEMBOOT
- or folderxxx (you do have a HD?)), start gulam and setup the enviroment
- as described by jrd. You should now be able to compile most programs
- (you can compile all of flex except parse.c and scan.c for an example).
- This is a good time to get the sources and extract the documentation
- from them, how else are you going to know about -mshort
- -fomit-frame-pointer etc.?
-
- Right. If there's sufficient demand, I'll package up the docs
- separately; or someone else with more time could do so... hint hint...
-
- 3) If a source file is too large to be compiled from GULAM, you will get
- a "no more virtual memory" message or someting like that (probably
- already from gcc-cpp).
-
- typically from gcc-cc1, actually...
-
- You can workaround this by running the
- compiler from the desktop, the current gcc.ttp will NOT work from the
- desktop (reasons follow), so you will have to write a small wrapper
- program to do this (I'm fixing gcc.ttp right now.....).
-
- Note:
- all gcc stuff assumes:
- file-handle
- 0 = stdin
- 1 = stdout
- 2 = stderr
- since the GEMDOS default for handle 2 is the serial
- port, this isn't much good when you start stuff from
- the desktop.
-
- Yah, I've since realized that 2 is the serial port (!). If you fix
- std-init, would you post the fixed version? Also, does anyone out there
- have a description of what file numbers 'default' to what?
-
- So you need a
- Fforce(2,Fdup(1))
- At the begining of your program to see any error output
- (and due to a bug in stdio to see any output at all).
-
- Trying this shows two bugs in the current runtime library:
-
- - Fforce has a wrong binding in osbind.h,
- it uses 3 short (aka 16 bit) arguments!
- Write a trap-1www function to do this.
- [BTW is anybody working on cleaning up
- the library, there is a lot of stuff that
- should be done]
-
- No kidding. As I said in the doc, the library is pretty ragged. I'm
- working on getting rid of the trap_foo functions, and generating the
- traps in line; perhaps it makes sense to post a recompiled library when
- that happens?
- [...]
-
- Don't get put off by this description, GNC CC is worth it!
-
- Glad you like it.
- End of article 11091 (of 11092)--what next? [npq]
-
- Article 11108 (6 more) in comp.sys.atari.st: 20Sept88
- Subject: (none)
- From: roseate!cjp@stag.UUCP (Charles Purcell)
-
- Re: gccGEMshell(long)
-
- What! Gnu C on the ATARI? Someone had to be creative for this! Yes,
- it is really the Gnu gcc compiler 1.23 for use on the ATARI-ST Mega
- and -ST line of M68000 based microcomputers. I emphasize the chipset
- which seems to have made the port possible. Gnu gcc has cost traffic
- for various servers, and a lot of head scratching for installers.This
- compiler is big and beneficial. The provided Gnu documentation is re-
- quired reading if you are to teach C programming with an ATARI. Even
- more remarkable is the port to ATARI! How can one use it on an ST-1040
- or 520+ First, the executable is in DRI format, with an extended sym-
- bol list,far advanced over DRI's symbol table, but structurally near-
- ly identical. Well,the nm68.prg from the developer's kit does read the
- symbol table of gcc, and does print out a redirectable output of good
- use in debug mode. As well, sid makes equally good use of this symbol
- table structure. Thus, the table structure is the same, equally limit-
- ed by an eight byte name string format. I use ar and nm in gnu format
- to read archives and object files for precise details. I would suspect
- that the n.out format of MarkWilliams would be more useful,but illegal.
-
- Please leave the symbol table in the standard DRI executable with the
- provision of a choice for no generation, -s . After the code is built,
- I find that an old public domain code prgstrip.prg strips off the
- symbol table precisely and accurately.(Anyway Richard has some strong
- words with respect to mandatory symbol table generation).
-
- I found the stacklocations, with the help of sid.ttp and environs.ttp
- I set cc1 0x05b1c8 to 0x018000 and cpp 0x8fcc to 0x020000 .
- With these stacks and using gemshell(below) in ROM-TOS, I have been
- able to compile the 140,00 byte source cccp.c into a 60 K byte .o
-
- I have eliminated my ramdisk, my print spooler, my corner clock and a
- large number of other goodies, just so that I can compile with gcc on
- either of my megabyte systems. As a priviledged user of RAM-TOS V.1.4
- I can report that it is possible to compile, carefully, even with TOS
- in RAM! I can do a better & larger compile using this gemshell that I
- was thinking about. Thanks, Simon Poole, for your thoughts about the
- utility of gcc, and the importance of usage on 1 megabyte machines.
- Otherwise, I was thinking, why not go for a RAM upgrade. At any rate
- here is the gemshell.c as get up for use in the g: partition.
- ( compiled using MWC , use with keyclick from GEM window , usage: )
- :-v hello.c -o hello.s on a hard disk partition
- :-v -Ia:\include hello.c -o hello.tos on either floppy(why dif?)
- SOURCE why MWC? because of GEM...
-
-
- /* gemshell.c forms gemshell.tos STdNet-StPaulMN 17Sep88 CJPurcell */
- /* "one-liner" shell to compile w/gcc on an ATARI-1040ST or ATARI-520+ */
- #include <osbind.h> /* provides maximum available execute space in 1meg */
- /* eventually,read this info from an initialization file, i.e., gnu.rc */
- static char *envp[] = { "gcc=g:\\exec\\gcc.ttp",
- "cc1=g:\\exec\\gcc-cc1.ttp",
- "cpp=g:\\exec\\gcc-cpp.ttp",
- "ld=g:\\exec\\gcc-ld.ttp",
- "as=g:\\exec\\gcc-as.ttp",
- "GCCEXEC=g:\\exec\\gcc-",
- "INCLUDE=g:\\include",
- "GNULIB=g:\\lib",
- "TEMP=p:",
- "PATH=",
- "A:\\",
- 0 };
- main() {
- unsigned char buffer[130];
- int status;
- buffer[0] = 128;
- Cconws("gccGEMshell Enter: command_line_string (^C exits)\r\n:");
- Cconrs(buffer);
- Cconws("\r\n");
- buffer[1] = ' '; /* command buffer mandatory space prefix */
- /* 0 selects loadgo */
- status = (int) Pexec( 0 , "g:\\exec\\gcc.ttp", &buffer[1], *envp );
- Cconws("\r\n Pause to read compiler messages; Any key continues: \r\n");
- Bconin(2);
- return(status);
- }
-
- and a binary useful for partition g:
- BINARY
- ---------------cut here for uudecode---------------------------
- table
- !"#$%&'()*+,-./0123456789:;<=>?
- @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
- begin 644 gemshell.tos
- M8!H .4 !K@ 8 P "IO 0@;0 8T>T '"1M "Q"z
- M@")(2A)G4"**)DHD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F4HU@[" -D+D 4:/P!.N0 =A43V .?D-@SGY!8,I^4&g
- M<-M,UR" 3EY.=4Y6 @+@ (;! @+@ (1( SP !4)P_V $("X "$Y>3G4 f
- M *D "J JP -D #8 UP /< #\ ! @ 0@ $-@ e
- M!$P 1A $= !(( 2* $D !G8V,]9SI<97AE8UQG8V,N='1Pd
- M &-C,3UG.EQE>&5C7&=C8RUC8S$N='1P &-P<#UG.EQE>&5C7&=C8RUC<' Nc
- M='1P &QD/6<Z7&5X96-<9V-C+6QD+G1T< !A<SUG.EQE>&5C7&=C8RUA<RYTb
- M=' 1T-#15A%0SUG.EQE>&5C7&=C8RT 24Y#3%5$13UG.EQI;F-L=61E $=.a
- M54Q)0CUG.EQL:6( 5$5-4#UP.@!0051(/0!!.EP 9V-C1T5-<VAE;&P@16YTz
- M97(Z("!C;VUM86YD7VQI;F5?<W1R:6YG(" @*%Y#(&5X:71S*0T*.@ -"@!Gy
- M.EQE>&5C7&=C8RYT=' #0H@4&%U<V4@=&\@<F5A9"!C;VUP:6QE<B!M97-Sx
- M86=E<SL@06YY(&ME>2!C;VYT:6YU97,Z( T* 4>0T-!4#\_/S\_/S\_w
- M/S\_/S\_/S\_/S\_/S\_/P @ !P$0 0H , )0# v
- M !@ "6 0 !@ 3"(R!@XD$@@." H,%AH4u
- F"A8F"D0.%# 6%"@<,CX*' @P$ 0$! 0$! 0$! 0$! 0$! 0!2 .t
- --MORE--(96%)
- s
- end
-
- electronic mail: Charles J.Purcell
- woods!cpurcell@eta 1260 W.Shryer Ave
- roseate!cjp@stag.UUCP St.Paul, MN 55113
-
- roseate!cjp@stag.UUCP(Charles Purcell )
- End of article 11108 (of 11114)--what next? [npq]
-
-